package com.sunlake.spring.main.model.course.dto;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.Data;

/**
 * 课程内容结构，用于解析 course_content JSON 字段。
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CourseContentDTO {
    private String headline;
    private String durationLabel;
    private Integer lessonsCount;
    private List<String> audience;
    private List<String> learningHighlights;
    private List<String> tags;
    private List<String> categoryIds;
    private CoursePreviewDTO previewMedia;
    private List<CourseOutlineSectionDTO> outline;

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class CoursePreviewDTO {
        private String type;
        private String url;
        private String duration;
    }

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class CourseOutlineSectionDTO {
        private String id;
        private String title;
        private String summary;
        private List<CourseOutlineLessonDTO> lessons;
    }

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class CourseOutlineLessonDTO {
        private String id;
        private String title;
        private String duration;
        private String mediaUrl;
    }
}
